
/**
 * 用户相关配置接口
 * @module user
 */

import req from './index'
/**
 * 获取验证码
 * @method getCode
 * @param {phone}
 * 
 */
const getMessage = (data) => {
    return req.get(`user/api/v2/message/${data}`, null)
}

/**
 * 登录
 * @method login
 * @param {phone}
 * 
 */
const login = (data) => {
    return req.post(`user/api/v2/login`, data, { 'Content-Type': 'application/json;charset=UTF-8' })
}

/**
 * 判断是否是新用户
 * @method checkLogin
 * @param {phone}
 * 
 */
const checkLogin = (data) => {
    return req.get(`user/api/v2/login/check?phone=${data}`, null)
}


export { getMessage, login, checkLogin };